﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

using System.Data.Entity;


namespace InvoiceProject.Models
{
    public class Quote : Invoice
    {


        [Required]
        public DateTime QuoteDate { get; set; }

        public DateTime ExpiryDate { get; set; }




        public new IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
        {

            if (QuoteDate > ExpiryDate)
                yield return new ValidationResult("Quote Date can not be greater than Quote Expiry Date");


        }



    }






      

}